<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>js中正则表达式</title>
		<script>
			var str="slskdfsoidjfs33i842sd/lfkjsdlfjsldfkjsdlkfjsdskdlkfsdf";
			//所有的非数字去掉
			var s2=str.replace(/[^\d]+/g,'');
			console.log(s2);
		</script>
	</head>
	<body>
	</body>
</html>